Copy rabbitmq file:
  file.managed:
    - name: /tmp/rabbitmq-server-3.6.1-1.noarch.rpm
    - source: /srv/files/rabbitmq-server-3.6.1-1.noarch.rpm
    - unless: test -f /tmp/rabbitmq-server-3.6.1-1.noarch.rpm

Install rabbitmq:
  cmd.run:
    - name: |
        cd /tmp
        rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
        rpm -ivh rabbitmq-server-3.6.1-1.noarch.rpm --nodeps
        service rabbitmq-server restart
    - unless: test -f /etc/init.d/rabbitmq-server

#Enable rabbitmq service:
#  service.running:
#    - name: rabbitmq-server
#    - enable: True
#    - watch:
#      - pkg: rabbitmq
